import request from '@/utils/request'
import { urlBuild } from '@/utils/tools'

export default {
    search(keywords) {
        const data = { keywords: keywords }
        let url = 'file/search'
        try {
            return request.get(urlBuild(url, data))
        } catch (e) {
            console.log('error')
            console.log(e)
        }
    },
    scanFile(pid, level, docType) {
        const data = { pid, level, docType }
        let url = 'file/scanFile'
        url = urlBuild(url, data)
        return request.get(url)
    }
}
